home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 27
/
027.d81
/
t.sprite boot
< prev
next >
Wrap
Text File
|
2022-08-26
|
4KB
|
242 lines
3-D SPRITE SCROLLING
by
David Stephens
COMMODORE POWER/PLAY MAGAZINE
August/September, 1986
**************************************
NOTE: You must have a joystick plugged
into Port 1 to use this program.
DO NOT attempt to run this program on
your Loadstar disk. First copy the
programs DDISK, DMAIN, DDATA, and
SPRITE MENU onto another disk that
has lots of free space. Then type:
LOAD"SPRITE MENU",8
RUN
**************************************
THE BIG PICTURE
---------------
This program helps you create
realistic animation sequences for your
programs by giving you the tools to
make sprites appear to get larger or
smaller. Using these tools, for
example, space fighters in your arcade
games could appear to vanish into the
distance.
How do you make sprites appear
larger and smaller? The solution
involves creating a sprite definition
for each size of the object. Of
course, if you defined each sprite
yourself, the job could take the
better part of the century.
Enter David Stephens' program. His
program takes the data for one sprite
and "compresses" or "de-reses" the bit
patterns but keeps the sprite's same
general appearance. (This program can
only be used on regular color mode
sprites.) The program compresses the
data and saves it to memory. The
program then repeats the process
until the sprite image is nothing
more than a dot.
When the program is finished, you
have 21 sprite definitions to choose
from. You may then pick various
sprites to make the "frames" of your
animation. After you have previewed
the animation and made any necessary
changes, you can save the data to
disk.
Once you have the data saved, how
do you incorporate it into your own
program? The best way is to use one
of Stephens' routines, DDISK, to
convert your data to data statements.
NUTS AND BOLTS
--------------
To use David Stephens' program, you
must have subprograms DDATA, DMAIN,
and DDISK on the same disk.
You begin with DDATA, the program
that contains the machine code for the
entire program in a file called
"AILE". Once this file is loaded, you
will be linked to a program called
DMAIN.
Now, if you list lines 1005-1020,
you will see the data for the sprite
to be compressed. This is where you
place the data statements for your own
sprite. Right now, it contains
statements used by a sample sprite.
The program then generates 21 sprite
definitions. To pick the definitions
you want, move the cursor (the large
block at the left) with the joystick
to that definition and press the fire
button. The chosen sprite will then
be turned to cyan. If you change your
mind later, move the cursor back to
the sprite and press the fire button.
After you have chosen the
definitions that you want to make up
the "frames" of the animation, move
the cursor to the upper right hand
corner of the screen.
The sprite at the top of the screen
now changes to read "STAY" at that
screen. If you move the joystick to
the left, the sprite will read "MENU".
Press the fire button to go to the
menu.
The menu allows you to examine the
animation, go back to the previous
screen to change sprites, save the
data to disk, or terminate the
program.
After you have saved the animation
(just follow the on-screen prompts),
choose the TERMINATE PROGRAM option.
With this option, you can use the
DDISK program to convert sprite
information to data statements.
To use the DDATA option, insert the
disk with the information you want
converted and run this option. You
will see a list of all files created
by DMAIN on that disk. You can choose
the file to convert or special options
that end the session and give you a
chance to insert another disk. If
you choose the END SESSION, you may
save the data statements as a program.
DISK FILES USED:
SPRITE BOOT SPRITE.TITLE.SHP
DMAIN DDATA
DDISK SPRITE MENU
-----------< end of text >------------